<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>航空订票</title>
    <link type="text/css" th:href="@{/css/public.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/css/global.css}">
    <link type="text/css" th:href="@{/css/selectinfo.css}" rel="stylesheet">
    <link type="text/css" th:href="@{/css/booking_new.css}" rel="stylesheet">
    <script th:src="@{/js/jquery-1.8.3.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/cities.js}" type="text/javascript"></script>
    <script th:src="@{/js/jquery.validate.js}" type="text/javascript"></script>
    <style type="text/css">
        .L_title {
            text-align: center;
            font-size: 22px;
            font-weight: bold;
            color: #1D1F92;
            height: 40px;
            line-height: 40px;
            border-bottom: #cccccc solid 1px;
            margin: 10px;
        }

    </style>
</head>
<body>
<header id="header">
    <hgroup>

        <address class="text blue">
            <p style="font-size: 15px;color: #fff">欢迎您，<span th:text="${session.customer.username}"></span>&nbsp;&nbsp;<a th:href="@{/home/logout}" style="color: #fff">退出</a></p>
        </address>

        <div class="clear"></div>
    </hgroup>
</header>
<menu id="menu">
    <nav>
        <ul class="menu_index">
<!--            <li id="menu-home"><a href="/home/index">首页</a> <i></i>-->
<!--            </li>-->
            <li id="menu-myceair"><a
                    th:href="@{/home/customerinfo}">我的信息</a>
                <i></i></li>
            <li id="menu-booking" class="current">
                <a href="index.jsp">预订行程</a>
                <i></i>
            </li>
        </ul>
    </nav>
</menu>

<section id="main-area">
    <article class="position">
        您的位置： <a href="#">首页</a> &gt;
        <h1>
            <a href="#">预订行程</a>
        </h1>
        &gt;
        <h1>下订单</h1>
    </article>

    <section id="content" class="auto">
        <section
                class="booking-select">
            <aside class="right-side">

                <hgroup
                        id="flight-departure">
                    <form th:action="@{/home/addOrder}" method="post">
                        <input type="hidden" th:value="${price}" name="price"/>
                        <input type="hidden" th:value="${seatType}" name="seatType"/>
                        <input type="hidden" th:value="${flight.id}" name="flightId"/>
                        <div id="main-area">

                            <div id="content">
                                <div class="clear"></div>
                                <div class="order_info" style="padding-top: 30px;">
                                    <h2>订单信息</h2>
                                    <div class="body">

                                        <div class="clear"></div>

                                        <div class="row1">
                                            <div class="col1" style="padding-top:0px"><br>去程</div>
                                            <div class="col2"><b><span th:text="${flight.startPlace}"></b> <b>22:20</b>
                                                <span class="pk" style="display: none;">2014-11-27</span>
                                                <span class="ex" style="display: inline;">
								<br>
								<span th:text="${#dates.format(flight.startDate, 'yyyy-MM-dd')}"></span>
								<br><span th:text="${flight.startAirport}"></span>
                                            </div>
                                            <div class="col4">
                                                <span class="pk" style="display: none;">————</span>
                                                <span class="ex" style="display: inline;">
							<span th:text="${flight.models.company.name}"></span>
							<br>
							<br>
							<span th:text="${seatType}"></span>
							</span>
                                            </div>
                                            <div class="col2">
                                                <b><span th:text="${flight.endPlace}"></b>
                                                <b>18:20</b>
                                                <span class="pk" style="display: none;">2014-11-27</span>
                                                <span class="ex" style="display: inline;">
								<br>
								<span th:text="${#dates.format(flight.endDate, 'yyyy-MM-dd')}"></span>
								<br><span th:text="${flight.endAirport}"></span>
                                            </div>
                                            <div class="col4">
                                                <br>
                                                <!--<a href="/index.jsp">修改航班</a>-->
                                            </div>
                                            <div class="clear"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="passenger_new">

                                    <div class="info" id="paxInput">
                                        <h2>填写乘机人资料</h2>
                                        <div class="body">
                                            <div class="box init">
                                                <div class="row">
                                                    <div class="col1">&nbsp;</div>
                                                    <div class="col2">
                                                        <input name="person" id="radio_ADT"
                                                               class="input_rc paxTypeRadio" type="radio" value="成人"
                                                               checked="checked">
                                                        <span class="radioSpan initno">成人</span>
                                                        <input name="person" id="radio_CHD"
                                                               class="input_rc paxTypeRadio initno" type="radio"
                                                               value="儿童">
                                                        <span class="radioSpan initno">儿童</span>
                                                    </div>
                                                </div>
                                                <div class="input_ADT" name="paxInput">
                                                    <div class="row">
                                                        <div class="col1"><i>*</i>
                                                            &nbsp;旅客姓名：
                                                        </div>
                                                        <div class="col2">
                                                            <input type="text" class="input selectInfo" name="realName"
                                                                   autocomplete="off" style="height:20px;"
                                                                   maxlength="28" th:value="${session.customer.realName}"></div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col1"><i>*</i>
                                                            &nbsp;证件号码：
                                                        </div>
                                                        <div class="col2">
                                                            <input type="text" class="input note_tips"
                                                                   name="identificationCard" style="height:20px;"
                                                                   tips="" th:value="${session.customer.idNumber}" ></div>
                                                    </div>
                                                    <div class="clear"></div>
                                                </div>
                                            </div>

                                            <div class="clear"></div>
                                        </div>
                                    </div>

                                    <div class="info" id="contactInfo">
                                        <h2>填写联系人资料</h2>
                                        <div class="body">
                                            <div class="form">
                                                <div class="row">
                                                    <div class="col1">
                                                        地址
                                                    </div>
                                                    <div class="col2">
                                                        <input type="text" name="address" style="height:20px;"
                                                               class="input"></div>
                                                </div>
                                                <div class="row">
                                                    <div class="col1">
                                                        <i>*</i>
                                                        移动电话
                                                    </div>
                                                    <div class="col2">
                                                        <input type="text" name="phoneNumber" style="height:20px;"
                                                               class="input" th:value="${session.customer.phone}">
                                                        <input id="finalprice" type="text" name="finalprice" value=" "
                                                               style="display: none">
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="none" id="inputInfo">
                                                <div class="btn"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="btn_confirm">
                                        <input type="submit" name="next" class="button navblue" value="确认并提交订单"
                                               id="btn_passenger"></div>

                                    <div class="infoFloat ready" id="infoFloat"
                                         style="position: absolute; left: 740px;">
                                        <h2>乘机人名单</h2>
                                        <div class="body">
                                            <ul></ul>
                                            <div class="clear"></div>
                                            <div class="itext">
							<span class="tktPrice">
							<div style="display:block" id="adult">
                                <i>基本票价：￥<span th:text="${price}" id="price"></span></i>
								<br></span>
                                            </div>
                                            <div style="display:none" id="children">
								<span class="tktPrice">
								<i>儿童票价：￥<span th:text="${halfPrice}" id="halfPrice"></span></i>
								<br></span>
                                                <i name="tax">儿童折扣:
                                                    <b>50%</b></i> <br></div>

                                            <i name="tax">帐号类型:
                                                <b>普通用户</b></i>
                                            <br>
                                            <i name="fee">享有折扣:
                                                <b>无折扣</b></i>
                                        </div>
                                        <div class="itotal">
                                            <div class="iname">订单总价：</div>
                                            <div id="totalPrice" class="iprice">￥
                                            <span th:text="${price}"></span>
                                            </div>
                                            <div class="clear"></div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <!--footer-->


                        </div>
                        </div>
                    </form>
                </hgroup>
            </aside>
            <div class="clear"></div>
        </section>
    </section>
</section>
<!--footer-->
<section id="blank"></section>
<script type="text/javascript">
    $(document).ready(function () {
        $("#finalprice").attr("value", 1200);
    });
    $("#radio_ADT").change(function () {
        var price = $("#price").text();
        $("#adult").css("display", "block");
        $("#children").css("display", "none");
        $("#totalPrice").html("￥" + price);
        $("#finalprice").attr("value", price);
    });
    $("#radio_CHD").change(function () {
        var price = $("#halfPrice").text();
        $("#children").css("display", "block");
        $("#adult").css("display", "none");
        $("#totalPrice").html("￥" + price);
        $("#finalprice").val(price);
        $("#finalprice").attr("value", price);
    });
</script>
</body>
</html>
